cmake_minimum_required(VERSION 3.0.0)
project(service_new VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)

find_package(OpenSSL REQUIRED)


include_directories(
  base/inc
  core/inc
  core/src
  context/inc
  context/src
  common_defines/types
  common_defines/interfaces
  dfx/inc
  ipc/inc)

add_library(
  service_new SHARED
  base/src/attributes.cpp
  base/src/relative_timer.cpp
  base/src/thread_handler_impl.cpp
  base/src/finite_state_machine_builder.cpp
  base/src/finite_state_machine_impl.cpp
  base/src/hdi_wrapper.cpp
  context/src/base_context.cpp
  context/src/context_pool_impl.cpp
  context/src/enroll_context.cpp
  context/src/simple_auth_context.cpp
  context/src/identify_context.cpp
  context/src/context_factory.cpp
  context/src/context_helper.cpp  
  context/src/context_callback_impl.cpp
  core/src/authentication_impl.cpp
  core/src/identification_impl.cpp
  core/src/credential_info_impl.cpp
  core/src/enrolled_info_impl.cpp
  core/src/enrollment_impl.cpp
  core/src/resource_node_impl.cpp
  core/src/resource_node_utils.cpp  
  core/src/resource_node_pool_impl.cpp
  core/src/schedule_node_impl.cpp
  core/src/schedule_node_builder.cpp
  core/src/schedule_node_helper.cpp
  core/src/secure_user_info_impl.cpp
  core/src/user_idm_database_impl.cpp
  core/src/user_idm_session_controller_impl.cpp
  dfx/src/iam_hitrace_helper.cpp
  ipc/src/co_auth_stub.cpp
  
  ipc/src/co_auth_service.cpp
  ipc/src/executor_messenger_stub.cpp
  ipc/src/executor_messenger_service.cpp
  ipc/src/user_auth_stub.cpp
  ipc/src/user_auth_service.cpp
  ipc/src/user_idm_stub.cpp
  ipc/src/user_idm_service.cpp
  ipc/src/ipc_common.cpp  
  ipc/src/user_auth_callback_proxy.cpp
  ipc/src/user_idm_callback_proxy.cpp
  ipc/src/executor_callback_proxy.cpp)

target_link_libraries(service_new PUBLIC ohos_hilog)
target_link_libraries(service_new PUBLIC ohos_utils)
target_link_libraries(service_new PUBLIC ohos_atm)
target_link_libraries(service_new PUBLIC iam_utils)
target_link_libraries(service_new PUBLIC driver_interface)
target_link_libraries(service_new PUBLIC safwk)
target_link_libraries(service_new PUBLIC OpenSSL::SSL)

target_include_directories(
  service_new PUBLIC base/inc core/inc idm/inc common_defines/types
                     common_defines/interfaces)
